using UnityEngine;
// [Assembly-CSharp.dll].AnimatedCoins
public class AnimatedCoins : MonoBehaviour
{
    
    #region AnimatedCoins.<ScaleTo>d__4
    // [Assembly-CSharp.dll].AnimatedCoins.<ScaleTo>d__4
    private sealed class _ScaleTo_d__4 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public AnimatedCoins __4__this;
        private int _i_5__2;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _ScaleTo_d__4(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            AnimatedCoins val_20;
            var val_21;
            int val_23;
            val_20 = this.__4__this;
            if(this.__1__state == 2)
            {
                goto label_1;
            }
            
            if(this.__1__state == 1)
            {
                goto label_2;
            }
            
            if(this.__1__state != 0)
            {
                    return true;
            }
            
            this.__1__state = 0;
            val_21 = 27358032;
            var val_19 = 0;
            label_15:
            if(val_19 >= val_20.transform.childCount)
            {
                goto label_6;
            }
            
            val_20.transform.GetChild(index:  0).GetChild(index:  0).localScale = new UnityEngine.Vector3() {x = mem[536895737], y = mem[536895737] + 4, z = mem[536895737] + 8};
            val_20.transform.GetChild(index:  0).GetChild(index:  0).localPosition = new UnityEngine.Vector3() {x = mem[536895737], y = mem[536895737] + 4, z = mem[536895737] + 8};
            val_19 = val_19 + 1;
            if(val_20.transform != null)
            {
                goto label_15;
            }
            
            label_1:
            this.__1__state = 0;
            val_23 = this._i_5__2 + 1;
            this._i_5__2 = val_23;
            if(val_20 != null)
            {
                goto label_17;
            }
            
            label_2:
            val_23 = 0;
            this.__1__state = 0;
            this._i_5__2 = 0;
            label_17:
            if(val_23 >= val_20.transform.childCount)
            {
                    return true;
            }
            
            val_21 = 27460872;
            Unknown val_16 = DG.Tweening.TweenSettingsExtensions.SetEase<System.Object>(t:  DG.Tweening.ShortcutExtensions.DOScale(target:  val_20.transform.GetChild(index:  this._i_5__2).GetChild(index:  0), endValue:  new UnityEngine.Vector3() {x = mem[536895737] + 12, y = mem[536895737] + 12 + 4, z = mem[536895737] + 20}, duration:  0.35f), ease:  27);
            UnityEngine.WaitForSeconds val_17 = 536895821;
            val_20 = val_17;
            val_17 = new UnityEngine.WaitForSeconds(seconds:  0.2f);
            this.__2__current = val_20;
            this.__1__state = 2;
            return true;
            label_6:
            UnityEngine.WaitForEndOfFrame val_18 = 536895817;
            val_20 = val_18;
            val_18 = new UnityEngine.WaitForEndOfFrame();
            this.__2__current = val_20;
            this.__1__state = 1;
            return true;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    
    #region AnimatedCoins.<MoveTo>d__5
    // [Assembly-CSharp.dll].AnimatedCoins.<MoveTo>d__5
    private sealed class _MoveTo_d__5 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public AnimatedCoins __4__this;
        private int _i_5__2;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _MoveTo_d__5(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            AnimatedCoins val_15;
            int val_16;
            val_15 = this.__4__this;
            if(this.__1__state == 2)
            {
                goto label_1;
            }
            
            if(this.__1__state == 1)
            {
                goto label_2;
            }
            
            if(this.__1__state != 0)
            {
                    return false;
            }
            
            this.__1__state = 0;
            mem[536882947] + 88.Play();
            UnityEngine.WaitForSeconds val_1 = 536895821;
            val_15 = val_1;
            val_1 = new UnityEngine.WaitForSeconds(seconds:  2f);
            this.__2__current = val_15;
            this.__1__state = 1;
            return false;
            label_1:
            this.__1__state = 0;
            UnityEngine.Vector3 val_5 = this.__4__this.coinIcon.position;
            Unknown val_7 = DG.Tweening.TweenSettingsExtensions.SetEase<System.Object>(t:  DG.Tweening.ShortcutExtensions.DOMove(target:  val_15.transform.GetChild(index:  this._i_5__2).GetChild(index:  0), endValue:  new UnityEngine.Vector3() {x = val_5.x, y = val_5.y, z = val_5.z}, duration:  0.5f, snapping:  false), ease:  30);
            val_16 = this._i_5__2 + 1;
            this._i_5__2 = val_16;
            goto label_12;
            label_2:
            this.__1__state = 0;
            UnityEngine.Coroutine val_9 = val_15.StartCoroutine(routine:  val_15.IncreaseScore());
            val_16 = 0;
            this._i_5__2 = 0;
            label_12:
            if(val_16 >= val_15.transform.childCount)
            {
                    return false;
            }
            
            UnityEngine.WaitForSeconds val_13 = 536895821;
            val_15 = val_13;
            val_13 = new UnityEngine.WaitForSeconds(seconds:  UnityEngine.Random.Range(minInclusive:  0.1f, maxInclusive:  0.2f));
            this.__2__current = val_15;
            this.__1__state = 2;
            return false;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    
    #region AnimatedCoins.<IncreaseScore>d__6
    // [Assembly-CSharp.dll].AnimatedCoins.<IncreaseScore>d__6
    private sealed class _IncreaseScore_d__6 : IEnumerator<object>, IEnumerator, IDisposable
    {
        // Fields
        private int __1__state;
        private object __2__current;
        public AnimatedCoins __4__this;
        private int _i_5__2;
        
        // Properties
        private object System.Collections.Generic.IEnumerator<System.Object>.Current { get; }
        private object System.Collections.IEnumerator.Current { get; }
        
        // Methods
        public _IncreaseScore_d__6(int __1__state)
        {
            this.__1__state = __1__state;
        }
        private void System.IDisposable.Dispose()
        {
        
        }
        private bool MoveNext()
        {
            UnityEngine.UI.Text val_6;
            int val_7 = this.__1__state;
            if(val_7 != 0)
            {
                    if(val_7 != 1)
            {
                    return false;
            }
            
                this.__1__state = 0;
                UnityEngine.PlayerPrefs.SetInt(key:  -1610599799, value:  (UnityEngine.PlayerPrefs.GetInt(key:  -1610599799)) + 1);
                val_6 = this.__4__this.totalEarning;
                string val_4 = UnityEngine.PlayerPrefs.GetInt(key:  -1610599799).ToString();
                val_7 = this._i_5__2 + 1;
                this._i_5__2 = val_7;
            }
            else
            {
                    this.__1__state = 0;
                this._i_5__2 = 0;
            }
            
            if(val_7 >= this.__4__this.coins)
            {
                    return false;
            }
            
            UnityEngine.WaitForFixedUpdate val_5 = 536895819;
            val_6 = val_5;
            val_5 = new UnityEngine.WaitForFixedUpdate();
            this.__2__current = val_6;
            this.__1__state = 1;
            return false;
        }
        private object System.Collections.Generic.IEnumerator<System.Object>.get_Current()
        {
            return (object)this.__2__current;
        }
        private void System.Collections.IEnumerator.Reset()
        {
            27351792 = new System.NotSupportedException();
            throw 27351792;
        }
        private object System.Collections.IEnumerator.get_Current()
        {
            return (object)this.__2__current;
        }
    
    }
    
    #endregion
    
    // Fields
    public UnityEngine.Transform coinIcon;
    private int coins;
    public UnityEngine.UI.Text totalEarning;
    
    // Methods
    private void OnEnable()
    {
        UnityEngine.Coroutine val_2 = this.StartCoroutine(routine:  this.ScaleTo());
        UnityEngine.Coroutine val_4 = this.StartCoroutine(routine:  this.MoveTo());
        this.coins = UnityEngine.Random.Range(minInclusive:  10, maxExclusive:  200);
    }
    private System.Collections.IEnumerator ScaleTo()
    {
        object val_1 = 536897531;
        val_1 = new System.Object();
        mem[536897547] = 0;
        mem[536897563] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    private System.Collections.IEnumerator MoveTo()
    {
        object val_1 = 536897529;
        val_1 = new System.Object();
        mem[536897545] = 0;
        mem[536897561] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    private System.Collections.IEnumerator IncreaseScore()
    {
        object val_1 = 536897527;
        val_1 = new System.Object();
        mem[536897543] = 0;
        mem[536897559] = this;
        return (System.Collections.IEnumerator)val_1;
    }
    public AnimatedCoins()
    {
    
    }

}
